package StackAndQueue;

import java.util.LinkedList;
import java.util.Queue;

public class QueueTest {
    public static void main(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        queue.offer(1);
        queue.offer(2);
        queue.offer(3);
        queue.offer(4);
        System.out.println(queue);

        int number = queue.peek();
        System.out.println(number);

        int count = queue.size();
        System.out.println(count);

        int q = queue.poll();
        System.out.println(q);

        if(queue.isEmpty()){
            System.out.println("为空");
        }else{
            System.out.println("不为空");
        }


    }
}
